package com.yylending.las.lending.process;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.content.Loader;
import android.view.View;
import android.widget.ImageView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.yyfax.infrastructure.mvp.Presenter;
import com.yyfax.infrastructure.statistics.StatService;
import com.yylending.las.Constants;
import com.yylending.las.R;
import com.yylending.las.StatIDSet;
import com.yylending.las.base.BaseActivity;

/**
 * 提额类型选择界面
 * Created by Pengrf on 2017/11/17.
 * Copyright  2017 www.yyfax.com. All Rights Reserved.
 */
public class PreIncreaseLimitActivity extends BaseActivity {

	@BindView(R.id.pre_increase_policy_iv)
	ImageView mPreIncreasePolicyIv;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_pre_increase_limit);
		ButterKnife.bind(this);
		setTitle(R.string.more_information);
	}

	@Override
	protected void onStart() {
		super.onStart();
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
	}

	public static void start(Activity activity) {
		Intent intent = new Intent(activity, PreIncreaseLimitActivity.class);
		activity.startActivity(intent);
	}

	@Override
	public void onLoadFinished(Loader<Presenter> loader, Presenter data, int placeholder) {

	}

	@Override
	public Loader<Presenter> onCreateLoader(int id, Bundle args) {
		switch (id) {
			default:
				return null;
		}
	}

	@Override
	public void onFunctionalCompleted(boolean autoTips) {
		super.onFunctionalCompleted(autoTips);
		dismissLoading();
	}

	@OnClick(R.id.pre_increase_policy_iv)
	public void onViewClicked(View view) {
		switch (view.getId()){
			case R.id.pre_increase_policy_iv:
				StatService.onEvent(PreIncreaseLimitActivity.this, StatIDSet.EVENT_ID_SELECT_INCREASE_BY_POLICY);
				IncreaseLimitByPolicyActivity.start(PreIncreaseLimitActivity.this, true);
				finish();
				break;
		}
	}
}